no_arc4random_buf
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sun, 20 May 2018 21:57:15 +0000 (22:57 +0100)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Sun, 20 May 2018 21:57:15 +0000 (22:57 +0100)
Gbp-Pq: Name no_arc4random_buf.diff

src/corelib/global/qrandom.cpp

index 72ba299280d9e46de904722aa17f11c7c81d65d0..df5c5441372255593a5c7afc71f9e0f0d25e71f3 100644 (file)
@@ -50,7 +50,7 @@
 
 #if QT_CONFIG(getentropy)
 #  include <sys/random.h>
-#elif !defined(Q_OS_BSD4) && !defined(Q_OS_WIN)
+#elif (!defined(Q_OS_BSD4) || defined(__GLIBC__)) && !defined(Q_OS_WIN)
 #  include "qdeadlinetimer.h"
 #  include "qhashfunctions.h"
 
@@ -260,7 +260,7 @@ static void fallback_fill(quint32 *, qsizetype) Q_DECL_NOTHROW
     // no fallback necessary, getentropy cannot fail under normal circumstances
     Q_UNREACHABLE();
 }
-#elif defined(Q_OS_BSD4)
+#elif defined(Q_OS_BSD4) && !defined(__GLIBC__)
 static void fallback_update_seed(unsigned) {}
 static void fallback_fill(quint32 *ptr, qsizetype left) Q_DECL_NOTHROW
 {